package com.jin.spirng_boot_learn.untils;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class MyWebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {


    @Override
    protected Class<?>[] getRootConfigClasses() {
        return new Class[]{RootConfigre.class};
    }

    @Override
    protected Class<?>[] getServletConfigClasses() {
        return new Class[]{AppConfig.class};
    }

    //  / 拦截所有请求 不包含 *.jsp
    // /* 拦截所有请求 包含 *.jsp
    @Override
    protected String[] getServletMappings() {
        return new String[]{"/"};
    }
}
